package com.brillilab.domain.enums.kit;

import com.brillilab.domain.enums.base.BaseEnum;
import com.brillilab.domain.enums.lab.LabEnum;

/**
 * 取用列表/未归还列表 枚举
 */
public class KitUsageEnum {

    public enum State implements BaseEnum<State,Integer>{
        TAKE("未取用",1),TAKING("取用中",2),NOT_RETURN("未归还",3),RETURNING("归还中",4),RETURNED("已归还",5);

        public String key;
        private Integer value;

        State(String key,Integer value) {
            this.key = key;
            this.value = value;
        }

        public String getKey() {
            return key;
        }

        public static String getKey(Integer value) {
            for (LabEnum.State p : LabEnum.State.values()) {
                if (p.getValue().equals(value)) {
                    return p.key;
                }
            }
            return null;
        }

        public Integer getValue() {
            return value;
        }
    }
}
